import React from 'react'
import {connect} from "react-redux";
import {RecommendWrapper, RecommendItem} from '../style'

class Recommend extends React.PureComponent {
    render() {
        const {recommendList} = this.props;
        return (
            <RecommendWrapper>
                {recommendList.map((item) => {
                    return <RecommendItem key={item.get('id')} imgUrl={item.get('imgUrl')}/>
                })}
            </RecommendWrapper>
        )
    }
}

const mapState = (state) => ({
    recommendList: state.getIn(['home', 'recommendList'])
});
export default connect(mapState, null)(Recommend)
